// router.js
import { createRouter, createWebHistory } from 'vue-router';

// 引入Vue组件
import HomePage from './components/pages/HomePage.vue';

// 定义路由
const routes = [
  {
    path: '/', component: HomePage,
    children: [
      {
        path: '',
        name: "IndexPage",
        component: () => import("./components/pages/IndexPage.vue")
      },
      {
        path: 'lorapicpage',
        name: 'LoraPicPage',
        component: () => import("./components/pages/LoraPicPage.vue")
      },
      {
        path:'personpage',
        name:'PersonPage',
        component:()=>import("./components/pages/PersonPage.vue")
      },
      {
        path:'aisoulpage',
        name:'AiSoulPage',
        component:()=>import("./components/pages/AiSoulPage.vue")
      }
    ]

  },
  {
    path: '/createlorapage',
    component: () => import("./components/pages/CreateLoraPage.vue"),
    children:[
      {
        path:'',
        name:"Text2PicComp",
        component:()=>import("./components/dealpiccomp/Text2PicComp.vue")
      },
      {
        path:'pic2pic',
        name:"Pic2PicComp",
        component:()=>import("./components/dealpiccomp/Pic2PicComp.vue")
      },
      {
        path:'highpic',
        name:"HighPicComp",
        component:()=>import("./components/dealpiccomp/HighPicComp.vue")
      },
      {
        path:'photo',
        name:"PhotoComp",
        component:()=>import("./components/dealpiccomp/PhotoComp.vue")
      },
      {
        path:'pic2video',
        name:"Pic2VideoComp",
        component:()=>import("./components/dealpiccomp/Pic2VideoComp.vue")
      },
      {
        path:'partchange',
        name:"PartChangeComp",
        component:()=>import("./components/dealpiccomp/PartChangeComp.vue")
      }
    ]
  },
  {
    path:"/login",
    component:()=>import("./components/pages/LoginPage.vue"),
    name:"LoginPage"
  },
  {
    path:"/vippage",
    component:()=>import("./components/pages/VipPage.vue"),
    name:"VipPage"
  },
  {
    path:"/photopage",
    component:()=>import("./components/pages/PhotoPage.vue"),
    name:"PhotoPage"
  }
];

// 创建router实例
const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;